package pages;

import org.openqa.selenium.By;
import org.openqa.selenium.support.PageFactory;
import selenium.WebDriverWrapper;
import utils.LogTest;

/**
 * Created by Olga on 10.06.2014.
 */
public abstract class BasePage {

    protected static WebDriverWrapper driver;
    protected String URL;

    public BasePage(WebDriverWrapper driver, String URL) {
        this.driver = driver;
        this.URL = URL;
        PageFactory.initElements(driver, this);
    }

    abstract public void open();

    public boolean isOpen() {
        return driver.getCurrentUrl().equals(URL);
    }

}
